<template>
  <!---------------------- 店铺会员列表（主要用于头像为店铺或者会员的列表） ---------------------->
  <div class="mt-25">
    <div class="contentSearch br-32 flex-s-c fs-24 pl-25">
      <van-icon name="search" class="color-white" />
      <input
        class="pl-20 color-white"
        type="text"
        :placeholder="placeholder"
        v-model="searchValue"
        @keyup.enter="search"
      />
      <button class="color-primary bg-white flex-s-0 br-32 plr-45 fs-26" @click="search">搜索</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'contentSearch',
  props: {
    // 内容搜索类型
    placeholder: {
      type: String,
      required: true,
      default: '请输入搜索关键字'
    }
  },
  data() {
    return {
      searchValue: ''
    }
  },
  methods: {
    search() {
      this.$emit('search', this.searchValue)
    }
  }
}
</script>

